#include <stdio.h>
#include<math.h>
int main()
{
   int  x = 0;
   scanf("%d",&x);
   int a  = x/1000;
   int b  = (x -a*1000)/100;
   int c = (x - a*1000-b*100)/10;
   	 printf("%d ",a);
   	 printf("%d ",b);
   	 printf("%d ",c);
   	 printf("%d ",x%10);
   return 0;
}
 	
 	
 	
 
